package com.ithuaxin.identifier;

import java.util.Scanner;

public class Test21 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int a = sc.nextInt();
        int i = 1;
        while (i*i<a){
            i++;
        }
        if (i*i>a){
            i--;
            System.out.println("该数的平方根的整数部分是"+i);
        }
        else if (i*i==a){
            System.out.println("该数的平方根是"+i);
        }


    }
}
